#ifndef _NEURNET_H
#define _NEURNET_H
#include <iostream>
#include <math.h>
#include <cstdlib> 
#include <ctime> 
#define UWORD unsigned short int

class NeuralNetwork
{
private:
	int numInput;
	int numHidden;
	time_t startTime;

	double **weightsHidden;
	double **weightsOutput;
	double **correctHidden;
	double **correctOutput;
	double *resultsHidden;
	double *resultsOutput;

	double **samplesInput;
	int samplesCount;
	double samplesSigma;

	void CalculateResult(int sampleNumber);
	void TrainSample(int sampleNumber);

public:

	NeuralNetwork(int _numInput, int _numHidden);
	~NeuralNetwork();
	int TrainigSample(double** _samplesInput, int _samplesCount, int _sampleEntries);
	int GetResults(double** results,int _resultsCount, int _resultsEntries);
	int Train(int max_iter, int max_seconds, int max_SNR, double start_ETA, int verboose);
	double** GetHiddenWeights();
	double** GetOutputWeights();
	double*	 GetHiddenOutputs(int sampleNumber);
	int GetPartialResults(UWORD* hiddenOutput, double* resultLocation);
};

#endif
